﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Agnes.TaskManager"
                    xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
                    xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
                    xmlns:dxsch="http://schemas.devexpress.com/winfx/2008/xaml/scheduler"
                    xmlns:TaskManager="clr-namespace:Agnes.TaskManager" 
                    x:Name="TaskManagerResource">


    <dxb:BarItemCollection x:Key="TaskManagerBarItems">
        <dxb:BarButtonItem Command="{Binding Path=NavigateViewBackward, Mode=OneTime, Source={StaticResource SchUIcommands}}" 
                                   CommandParameter="{Binding TaskManager:TaskManagerService.SchedularControl}" 
                                   Name="biNavigateViewBackward" />
        <dxb:BarButtonItem Command="{Binding Path=NavigateViewForward, Mode=OneTime, Source={StaticResource SchUIcommands}}" 
                                   CommandParameter="{Binding TaskManager:TaskManagerService.SchedularControl}" 
                                   Name="biNavigateViewForward" />
        <dxb:BarButtonItem Command="{Binding Path=GotoToday, Mode=OneTime, Source={StaticResource SchUIcommands}}" 
                                   CommandParameter="{Binding TaskManager:TaskManagerService.SchedularControl}" 
                                   Name="biGotoToday" />
        <dxb:BarButtonItem Command="{Binding Path=ViewZoomIn, Mode=OneTime, Source={StaticResource SchUIcommands}}" 
                                   CommandParameter="{Binding TaskManager:TaskManagerService.SchedularControl}" 
                                   Name="biViewZoomIn" />
        <dxb:BarButtonItem Command="{Binding Path=ViewZoomOut, Mode=OneTime, Source={StaticResource SchUIcommands}}" 
                                   CommandParameter="{Binding TaskManager:TaskManagerService.SchedularControl}" 
                                   Name="biViewZoomOut" />
        <dxb:BarCheckItem Command="{Binding Path=SwitchToDayView, Mode=OneTime, Source={StaticResource SchUIcommands}}" 
                                  CommandParameter="{Binding TaskManager:TaskManagerService.SchedularControl}" 
                                  Name="biSwitchToDayView" />
        <dxb:BarCheckItem Command="{Binding Path=SwitchToWorkWeekView, Mode=OneTime, Source={StaticResource SchUIcommands}}" 
                                  CommandParameter="{Binding TaskManager:TaskManagerService.SchedularControl}" 
                                  Name="biSwitchToWorkWeekView" />
        <dxb:BarCheckItem Command="{Binding Path=SwitchToWeekView, Mode=OneTime, Source={StaticResource SchUIcommands}}" 
                                  CommandParameter="{Binding TaskManager:TaskManagerService.SchedularControl}" 
                                  Name="biSwitchToWeekView" />
        <dxb:BarCheckItem Command="{Binding Path=SwitchToMonthView, Mode=OneTime, Source={StaticResource SchUIcommands}}" 
                                  CommandParameter="{Binding TaskManager:TaskManagerService.SchedularControl}" 
                                  Name="biSwitchToMonthView" />
        <dxb:BarCheckItem Command="{Binding Path=SwitchToTimelineView, Mode=OneTime, Source={StaticResource SchUIcommands}}" 
                                  CommandParameter="{Binding TaskManager:TaskManagerService.SchedularControl}" 
                                  Name="biSwitchToTimelineView" />
        <dxb:BarCheckItem Command="{Binding Path=SwitchToGroupByNone, Mode=OneTime, Source={StaticResource SchUIcommands}}" 
                                  CommandParameter="{Binding TaskManager:TaskManagerService.SchedularControl}" 
                                  Name="biSwitchToGroupByNone" />
        <dxb:BarCheckItem Command="{Binding Path=SwitchToGroupByDate, Mode=OneTime, Source={StaticResource SchUIcommands}}" 
                                  CommandParameter="{Binding TaskManager:TaskManagerService.SchedularControl}" 
                                  Name="biSwitchToGroupByDate" />
        <dxb:BarCheckItem Command="{Binding Path=SwitchToGroupByResource, Mode=OneTime, Source={StaticResource SchUIcommands}}"
                                  CommandParameter="{Binding TaskManager:TaskManagerService.SchedularControl}" 
                                  Name="biSwitchToGroupByResource" />

        <dxb:BarButtonItem Content="新建同级任务" x:Name="biNewTask" Command="local:NewTaskSummaryCmd.Requery" Glyph="..\Images\NewSameLevelTask.ico"/>
        <dxb:BarButtonItem Content="新建子任务" x:Name="biNewSubTask" Command="local:NewSubTaskSummaryCmd.Requery" Glyph="..\Images\NewSubLevelTask.ico"/>
        <dxb:BarButtonItem Content="删除任务" x:Name="biDelTask" Command="local:DelTaskCmd.Requery" Glyph="..\Images\Delete.ico"/>
        <dxb:BarButtonItem Content="编辑任务" x:Name="biEditTask" Command="local:EditTaskCmd.Requery" Glyph="..\Images\TaskEditor.ico"/>
        <dxb:BarButtonItem Content="标签编辑" x:Name="biLabelEdit" Command="local:TaskLabelsEditorCmd.Requery" />
        
        <dxb:BarButtonItem Content="任务汇总表" x:Name="biTaskTreeView"
                           Command="local:OpenSummaryViewCmd.Requery" />
        <dxb:BarButtonItem Content="日历模式" x:Name="biTaskCalendarView"
                           Command="local:OpenTaskCalendarViewCmd.Requery" />
        <dxb:BarButtonItem Content="时间视图" x:Name="biTimeLineView" 
                           Command="local:OpenTimeLineViewCmd.Requery" />
        <dxb:BarButtonItem Content="日视图" x:Name="biDailyView" 
                           Command="local:OpenDailyViewCmd.Requery" />
        <dxb:BarButtonItem Content="周视图" x:Name="biWeeklyView" 
                           Command="local:OpenWeeklyViewCmd.Requery" />
        <dxb:BarButtonItem Content="月视图" x:Name="biMonthlyView" 
                           Command="local:OpenMonthlyViewCmd.Requery" />

    </dxb:BarItemCollection>

    <dxr:RibbonPage x:Key="TaskManagerRibbonPage" Caption="任务管理">
        
        <dxr:RibbonPageGroup Caption="任务">
            <dxb:BarButtonItemLink BarItemName="biEditTask" RibbonStyle="Large" /> 
            <dxb:BarButtonItemLink BarItemName="biNewTask" />
            <dxb:BarButtonItemLink BarItemName="biNewSubTask" />
            <dxb:BarButtonItemLink BarItemName="biDelTask" />
            
        </dxr:RibbonPageGroup>
        
        <dxr:RibbonPageGroup Caption="视图">
            <dxb:BarButtonItemLink BarItemName="biTaskTreeView" RibbonStyle="Large"/>
            <dxb:BarButtonItemLink BarItemName="biTaskCalendarView" RibbonStyle="Large"/>
            <dxb:BarButtonItemLink BarItemName="biTimeLineView" RibbonStyle="Large"/>
            <dxb:BarButtonItemLink BarItemName="biDailyView" RibbonStyle="Large"/>
            <dxb:BarButtonItemLink BarItemName="biWeeklyView" RibbonStyle="Large"/>
            <dxb:BarButtonItemLink BarItemName="biMonthlyView" RibbonStyle="Large"/>
        </dxr:RibbonPageGroup>
        
        <dxr:RibbonPageGroup Caption="操作" >
            <dxb:BarButtonItemLink BarItemName="biLabelEdit" />
        </dxr:RibbonPageGroup>
        
    </dxr:RibbonPage>
</ResourceDictionary>